<template>
  <div ref="split" class="split">
    <!-- <SeamlessIframe :plugUrl="plugUrl" /> -->
    <PlugLoader></PlugLoader>
  </div>
</template>

<script lang="ts" setup>
// import SeamlessIframe from '@/components/SeamlessIframe.vue';
import PlugLoader from '@/plugs/plugLoader.vue';
import { onMounted } from 'vue';
// import router from "@/router/index";

defineOptions({
  name: "AdjustList"
});

// const plugUrl = ref("");

const channel = new BroadcastChannel('test-channel');
channel.onmessage = (e) => console.log(e.data); // 应收到 'Test from A'

onMounted(() => {

  // console.log("router", router.currentRoute.value);
  // plugUrl.value = `/modules${router.currentRoute.value.path}`;
  // console.log("plugUrl", plugUrl.value);


  // 创建一个全局的 BroadcastChannel 实例
  // (window as any).platformChannel = new BroadcastChannel('platform-plugin-channel');

  // 平台
  // const channel = new BroadcastChannel('platform-plugin-channel');
  // channel.postMessage({ type: 'platform-message', payload: 'Hello from Platform!' });

  // (window as any).platformChannel.onmessage = (event: any) => {
  //   console.log('Received from Plugin:', event.data);
  // };

  // console.log('我是平台 Channel instance:', (window as any).platformChannel); // 检查是否是同一个对象
});



</script>
<style scoped lang="scss"></style>
